#pragma once

namespace	MomogenkyouSystem	{

class	SoundSystem
{
protected:
	static	AUDIODEVICE			g_pDevice;
	static	AUDIOSTREAM			g_pBGMStream;

	static	std::string			g_CurrentBGMFile;
public:
	__inline	std::string		CurrentBGM()	{	return	g_CurrentBGMFile;	}

	//	Initialize the Sound system
	//	@param	param_WindowHandle		HWND of created window
	//	@param	param_WindowInstance	HINSTANCE of created window
	static		bool			Initialize(	const HWND		&	param_WindowHandle,
											const HINSTANCE &	param_WindowInstance);
	static		void			Shutdown();

	//	Loads and plays a Specified Audio file with streaming looped.
	static		void			PlayBGM(const std::string & Filename);
	//	Stops playing the BGM, does not remove
	static		void			StopBGM();
	static		void			SetBGMVolume(const float & fVolume);

	//	Create a Sound Effect Instance, Single/Multi Channel, Multi may cause caes of leaking
	static		SOUNDEFFECT		CreateSoundEffect(const std::string & Filename, const audiere::SoundEffectType & Type);
	//	Delete the sound Effect, may not be necessary
	static		void			DeleteSoundEffect(SOUNDEFFECT	pEffect);

	static		void			Update(const float & fInterval);
};


}